<template>
    <div class="scan__base-wrap">
        <h2>基础案例</h2>
        <div class="scan__content">
            <div class="loader-plus">
                <span class="scan"></span>
            </div>
        </div>
    </div>
</template>
<script setup>
defineOptions({name: 'ScanBase'})
</script>
<style lang="scss">
.scan__base-wrap {
    color: #fff;
    background: #010d19;
    height: 100%;
    padding: 10px;
    .scan__content {
        display: grid;
        place-items: center;
    }
    .loader-plus {
        border-radius: 50%;
        border: 2px solid #10ac84;
        width: 400px;
        height: 400px;
        position: relative;
        overflow: hidden;
    }
    .loader-plus::before {
        position: absolute;
        content: "";
        inset: 56px;
        border-radius: 50%;
        border: 2px dashed #10ac84;
        z-index: 1;
    }
    .loader-plus::after {
        position: absolute;
        content: "";
        inset: 118px;
        border-radius: 50%;
        border: 2px dashed #10ac84;
        z-index: 1;
    }
    .scan {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 50%;
        height: 50%;
        background: transparent;
        border-top: 2px dashed #10AC84;
        transform-origin: top left;
        animation: scanAnimate 3s linear infinite;
    }
    /* 扫描线条在中间 */
    .scan::before {
        position: absolute;
        top: 0;
        left: 0;
        content: "";
        width: 107%;
        height: 50%;
        background: #10ac84;
        transform-origin: top left;
        transform: rotate(-45deg);
        filter: blur(72px) drop-shadow(120px 120px 120px #10ac84);
    }
    @keyframes scanAnimate {
        0% {
            transform: rotate(0deg);
        }
        100% {
            transform: rotate(360deg);
        }
    }
}
</style>
